package model

import (
	"context"
	"fmt"
	"service/ctrl"
	"service/model/mod"

	gpb "gitee.com/cloudapex/protos/crm_order/pb"
	"google.golang.org/grpc"
)

var COmmS comms

func init() {
	ctrl.GCon.RegistClienter(mod.GCONN_CRM_ORDER, func(c *grpc.ClientConn) {
		COmmS.cli = gpb.NewCommonOrderClient(c)
		fmt.Println(COmmS)
	})
}

type comms struct {
	cli gpb.CommonOrderClient
}

//学校列表
func (this *comms) SchoolList(ctx context.Context, in *gpb.SchoolCreateReq) (*gpb.SchoolListRes, error) {
	fmt.Println(this.cli.SchoolList(ctx, in))
	return this.cli.SchoolList(ctx, in)
}

//协助报名
func (this *comms) HelpSignList(ctx context.Context, in *gpb.HelpSignListReq) (*gpb.HelpSignListRes, error) {
	return this.cli.HelpSignList(ctx, in)
}

//证书
func (this *comms) CertList(ctx context.Context, in *gpb.CertListReq) (*gpb.CertListRes, error) {
	return this.cli.CertList(ctx, in)
}
